// pages/Server/Pub/Pub.js
const app = getApp();
var sev = require('../../../utils/sev.js');
const db = wx.cloud.database();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    index:0,
    picker: ['失物招领', '校园美景'],//['全部','考研资料','考试资料','失物招领','教师选课','校园美景','其他'],
   
    notshowvalue:false
  },
  onLoad(){
    var that = this;
    this.setData({ img: app.globalData.imgList.puburl})
    db.collection('admin').where({
      id:app.eduOS.xh
    }).get({
      success(res){
        var len = res.data.length;
        console.log(len)//长度！= 0 进行特权扩充
        if(len !=0){
          that.setData({
            picker: ['失物招领', '校园美景', '考研资料','考试资料']
          })
        }
        
      }
    })
  },
  PickerChange(e) {
    // console.log(e);
    this.setData({
      index: e.detail.value
    })
  }
})